﻿namespace QFramework
{
    /// <summary>
    /// 背包中的物品格子，每个格子最多只能存储一种Item
    /// </summary>
    public class Slot
    {
        public IItem Item;
        public int Count;
        
        /// <summary>
        /// 一个简单的事件系统，用于监听格子变化
        /// </summary>
        public EasyEvent Changed = new EasyEvent();

        /// <summary>
        /// 格子对应的格子组，判断格子属于哪个组，如背包，物品栏，装备栏，仓库等
        /// </summary>
        public SlotGroup Group { get; private set; }

        public Slot(IItem item,int count,SlotGroup group)
        {
            Item = item;
            Count = count;
            Group = group;
        }
    }
}